package com.ddwl.schema.bo.order;

import io.gitee.tooleek.lock.spring.boot.annotation.Key;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 类SubmitSeckillItemBo.java的实现描述：TODO
 *
 * @author zach
 * @Date :2020-10-29 14:43.
 */
@Getter
@Setter
@ApiModel("创建秒杀订单入参")
public class SubmitSeckillItemBo {

    @Key
    @NotNull(message = "活动ID不能为空")
    @ApiModelProperty("秒杀活动id")
    private String seckillId;

    @NotNull
    @ApiModelProperty("barcode")
    private String barcode;

    @NotNull(message = "下单数量不能为空")
    @Min(value = 1,message = "最少购1件")
    @ApiModelProperty("秒杀数量")
    private Integer seckillQty;

    @NotNull( message = "用户收货地址不能为空")
    @ApiModelProperty("用户收货地址ID")
    private String userAdderId;

    @ApiModelProperty(value = "来源信息信息(推广的时候用)")
    private String source;

    @ApiModelProperty("0快递1外送2自提默认快递")
    private Integer deliveryType;

    @ApiModelProperty(value = "备注")
    private String remark;


    @Size(max = 15,message = "电话长度过长")
    @ApiModelProperty("自提用户联系电话")
    private String userMobile;

}
